<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login form</title>
</head>
<body>
        <%
        //if user is already logged in - send him to menu
        String myname =  (String)session.getAttribute("username");
        if(myname!=null)
            {
        	response.sendRedirect("Menu.jsp");
          	}
        else 
            {
            %>
            <div id="loginform">
	            <form method="post" action="CheckLogin">
		                <table>
		                	<tr>
		                   		<td style="color: black; font-weight:bold; padding-bottom: 20px" > Web simulations G3</td>
		                    </tr>
		                	<tr>
		                        <td> Username  : </td>
		                    </tr>
		                    <tr>
		                        <td> <input name="username" type="text" style="font-size:28px; width: 320px"/> </td> 
		                    </tr>
		                    <tr>
		                        <td> Password  : </td>
		                    </tr>
		                    <tr>
		                        <td> <input name="password" type="password" style="font-size:28px; width: 320px"/> </td> 
		                    </tr>
		                </table>
		            <div class="loginbutton">
	                	<input type="submit" value="Sign in" style="margin-top: 20px; font-size:28px; width: 330px; height: 60px;"/>
	                </div>
	            </form>
            </div>
            <% 
            }
            %>
</body>
</html>